package cn.gok.springbootdemo06.logtest;

import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: chen fan
 * @since: 2022/11/16 15:11
 * @description:
 */
@RestController
@Slf4j
public class TestController {


    @RequestMapping("/updateUser")
    public String updateUser(Integer id,String userName){
        log.info("开始执行修改用操作，id："+ id + ",userName: "+ userName);
        log.info("开始执行修改用操作，id：{}, userName: {}",id,userName);

        log.error("修改用户信息出现异常，请求地址为：http://localhost:8080/updateUser");
        log.error("请求参数：id：{}, userName: {}",id,userName);
        log.error("错误信息： 空指针异常");

        return "修改成功";

    }
}
